package com.mediocre.common.util;

import com.mediocre.common.constant.Constants;
import org.springframework.http.MediaType;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * @author 张伟
 * @desc
 * @date 2022/1/2 下午10:32
 * @modifier
 */
public class WebUtils {

    public static void out(HttpServletResponse response, String message) throws IOException {
        response.setContentType(MediaType.APPLICATION_JSON_UTF8_VALUE);
        PrintWriter out = response.getWriter();
        out.write(message);
        out.flush();
        out.close();
    }
}
